package com.runa.rccprotocol.dto;

import com.runa.protocol.dto.IRequestData;
import com.runa.protocol.dto.IResponseData;
import lombok.extern.slf4j.Slf4j;

/**
 * @author zhuj
 */
@Slf4j
public class ConcentratorRequestDataProxy extends ConcentratorRequestData {

    private final IRequestData<byte[]> requestData;

    public ConcentratorRequestDataProxy(String address, IRequestData requestData) {
        super(address);
        this.requestData = requestData;
    }

    @Override
    public boolean isHaveResult() {
        return requestData.isHaveResult();
    }

    @Override
    public byte[] getData() {
        return requestData.getData();
    }

    @Override
    public boolean check(IResponseData data) {
        return requestData.check(data);
    }
}
